package com.woniuxy.main.chat_yj.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import com.woniuxy.main.chat_yj.model.ChatRecord;

/**
 * 保存聊天记录
 */
@Mapper
public interface ChatDao {

	
	/**
	 * 保存聊天记录   （主键、聊天内容、发送者、接受者、是否已读、聊天时间、群聊id  
	 * @param chatRecord
	 * @return
	 */
	@Insert("insert into chat_record(id,message,send_user,receive_user,"
			+ "is_read,create_date,group_id) VALUES (#{id},#{message},"
			+ "#{send_user},#{receive_user},#{is_read},#{create_date},#{group_id})")
    int saveChatRecord(ChatRecord chatRecord);

}
